package com.sz.admin.system.service;

import java.io.File;

/**
 * OCR识别服务接口
 *
 * @author sz-admin
 * @since 2025-09-16
 */
public interface OcrRecognitionService {

    /**
     * OCR识别结果对象
     */
    class OcrResult {
        private boolean success;
        private String totalText;
        private String fullResponse;
        private String errorMessage;

        public OcrResult(boolean success, String totalText, String fullResponse, String errorMessage) {
            this.success = success;
            this.totalText = totalText;
            this.fullResponse = fullResponse;
            this.errorMessage = errorMessage;
        }

        public boolean isSuccess() { return success; }
        public String getTotalText() { return totalText; }
        public String getFullResponse() { return fullResponse; }
        public String getErrorMessage() { return errorMessage; }
        
    }

    /**
     * 调用OCR服务识别图片中的文字
     *
     * @param imageFile 图片文件
     * @return OCR识别结果
     */
    OcrResult recognizeText(File imageFile);
}